home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d26 / pedhlp13.arc / ALGORITH < prev    next >
Text File  |  1991-06-14  |  4KB  |  81 lines

  1.         ■ EXPLANATION OF MAPPING ALGORITHM
  2.  
  3.         This is provided so that the optimum order for including people
  4.         in the data file can be decided upon. The aim would be to reduce
  5.         the number of crossings over of lines, and to avoid having to
  6.         repeat individuals in different parts of the diagram.
  7.  
  8.         In general people are added to the pedigree diagram in order
  9.         from top to bottom and from left to right. The algorithm used is
  10.         as follows:
  11.  
  12.         1. An individual whose descendants are to be displayed is
  13.         selected by the user.
  14.  
  15.         2. If the option to extend the pedigree and show all members
  16.         is selected then instead of starting with the individual given
  17.         the program attempts to begin with the oldest ancestor of this
  18.         individual it can find.
  19.  
  20.         3. The following process is repeated (recursively) for each
  21.         individual in turn, beginning with the common ancestor provided.
  22.  
  23.         A. The index individual is marked as "dealt with", and is drawn.
  24.  
  25.         B. The next spouse of the index individual is selected. The next
  26.         spouse is the one who has a child which appears in the data
  27.         file before the children of other spouses, provided that the
  28.         spouse is not marked as "dealt with".
  29.  
  30.         C. Each of the children of the index individual and this spouse
  31.         is in turn selected. If the child has already been drawn then a
  32.         line will be drawn from the current sibship to the place where
  33.         the child appears in the pedigree, unless the child has been
  34.         shown in an earlier generation (when the line would have to go
  35.         "uphill"), in which case the child is drawn again but is marked
  36.         as a repeat ("REP"). If the child is not marked as "dealt with"
  37.         it is set as the new index individual and the process beginning
  38.         in 3A is applied to it (i.e. it's spouses and children will be
  39.         displayed).
  40.  
  41.         D. If the option to extend the pedigree and show all members
  42.         is selected then the oldest ancestor of the spouse is added to a
  43.         "to-be-done-later" list.
  44.  
  45.         E. The spouse is set to be the new index individual and the
  46.         process beginning in 3A is applied to it.
  47.  
  48.         4. If the option to extend the pedigree and show all members is
  49.         selected then for everyone in the "to-be-done-later" list the
  50.         process beginning in 3A is applied.
  51.         
  52.         <CONFIGUR -AFLAG>
  53.  
  54.         The above algorithm actually works quite well, even for fairly
  55.         complex pedigrees. However it does fall down if there is a
  56.         complete marriage loop, as when a husband has children by his
  57.         ex-wife's ex-husband's ex-wife. If H1 has children by W1 and
  58.         W1 has children by H2 and H2 has children by W2, then if W2 has
  59.         children by H1 the program will not display them (or the
  60.         marriage between H1 and W2) because H1 will already be marked as
  61.         "dealt with" by the time the circle comes round to him again. A
  62.         similar thing would happen if a man had children by his ex-
  63.         wife's ex-husband's daughter. In practice this should rarely be
  64.         a problem and I have no intention of fixing it at present. You
  65.         will have to work round it by creating a dummy individual to
  66.         break the loop.
  67.  
  68.         To avoid having unnecessary repeated individuals, make sure that
  69.         the ancestor belonging to the earliest generation is given
  70.         first. Note that to force a sibship of a given parent to be
  71.         shown first it is only necessary to promote one of the sibs in
  72.         it to be first in the data file. However to force a sibship to
  73.         be last all the sibs must come after all the other children of
  74.         that parent. <ADJUST -Promoting>
  75.  
  76.         I don't know whether to recommend that the easiest way to get
  77.         the best-looking pedigree is to try to understand the algorithm
  78.         or just use trial and error. In my experience it is almost
  79.         always possible to get whole the pedigree displayed without any
  80.         repeats. <ALGORITH -"REP">
  81.